//
//  PickerViewController.swift
//  HHSwift
//
//  Created by 华宏 on 2020/2/4.
//  Copyright © 2020 huahong. All rights reserved.
//

import UIKit

class PickerViewController: UIViewController,QKPickerViewDelegate {

    var pickerView = QKPickerView()

    override func viewDidLoad() {
        super.viewDidLoad()

         view.backgroundColor = .white
         title = "PickerView"
        
        pickerView.dataArray = ["111","222","333","444","555"]
        pickerView.delegate = self
       
        pickerView.sureBtnBlock = {(row,text) in
           print("Block Row:\(row) Text :\(text)")
        }
               
    }
    

   override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
          
          pickerView.show()
          
      }

  func pickerView(_ pickerView: QKPickerView, didSelectRow row: Int, selectText text: String) {
      
       print("Delegate Row:\(row) Text :\(text)")
         
     }
}
